﻿<%@ Page Title="" Language="C#" MasterPageFile="~/MasterPage/List.Master" AutoEventWireup="true" CodeBehind="WeekReport.aspx.cs" Inherits="Honestysoft.Financing.WebUI.Module.Reports.WeekReport" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <link href="../../Styles/jquery.validate.css" rel="stylesheet" type="text/css" />
    <script src="../../Scripts/jquery.validate.js" language="javascript" type="text/javascript"></script>
    <script src="../../Scripts/jquery.validate.message_cn.js" language="javascript" type="text/javascript"></script>
    <script type="text/javascript" src="../../Scripts/jquery.easyui.min.js"></script>
    <link rel="stylesheet" type="text/css" href="../../Styles/easyui.css" />
	<link rel="stylesheet" type="text/css" href="../../Styles/icon.css" />
    <script language="javascript" type="text/javascript">
        var opts = null;
        function InitRules() {
            opts = {
                 rules:
                 {
					<%= dtpStartDate.UniqueID%>:{required: true,dateISO: true},
					<%= dtpEndDate.UniqueID%>:{required: true,dateISO: true},
					<%= dtpSendDate.UniqueID%>:{required: true,dateISO: true}					
                 },
                 messages:
                 {
					<%= dtpStartDate.UniqueID%>:{required: "开始日期 请选择合适的值",dateISO: "开始日期 请选择有效的日期"},
					<%= dtpEndDate.UniqueID%>:{required: "结束日期 请选择合适的值",dateISO: "结束日期 请选择有效的日期"},
					<%= dtpSendDate.UniqueID%>:{required: "报送日期 请选择合适的值",dateISO: "报送日期 请选择有效的日期"}					
                 },
                 onfocusout:false,
                 onclick:false,
                 onkeyup:false,
                 errorPlacement: function(error, element) {
                    $("#errorContainer").show();
                    error.html("<li>* "+error.html()+"</li>");
                    error.appendTo("#errorContainer");
                 },
                 wrapper:"li"
            }
        }
        function AddOther(id){
            var retValue = window.showModalDialog('Bu_WeekReport_Other_Edit.aspx?WeekReportID=' + id+'&FunctionID=<%=Request["FunctionID"] %>', window, 'scroll:0;status:0;help:1;resizable:0;dialogWidth:350px;dialogHeight:200px');
            if (typeof (retValue) != "undefined" && retValue != null && retValue) {
                return true;
            }
            return false;
        }
        function EditOther(id){
            var retValue = window.showModalDialog('Bu_WeekReport_Other_Edit.aspx?ID=' + id+'&FunctionID=<%=Request["FunctionID"] %>', window, 'scroll:0;status:0;help:1;resizable:0;dialogWidth:350px;dialogHeight:200px');
            if (typeof (retValue) != "undefined" && retValue != null && retValue) {
                document.getElementById("<%=btnRebind.ClientID %>").click();
            }
        }	    
        function showReport(){
            var id=document.getElementById("<%=hidID.ClientID %>").value;
            var week=document.getElementById("<%=ddlWeek.ClientID %>").options[document.getElementById("<%=ddlWeek.ClientID %>").selectedIndex].text;
            ifrmInfo.location.href = '<%=System.Configuration.ConfigurationManager.AppSettings["ReportServerURL"] %>/R007&ID=' + id + '&Week='+week+'&rc:parameters=false';
        }
    </script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <table cellpadding="0" cellspacing="0" border="0" width="100%">
        <tr>
            <td width="270px" style="vertical-align:top">
                <div id="errorContainer" style="display:none;">
        <img alt='' src="<%= Page.ResolveClientUrl("~/") %>images/pic22.gif" />
        <span style="font-size:14px;font-weight:700;color:Black;">以下信息填写不正确：</span><br />
    </div>
    <div class="query_area">		
    年度：<asp:DropDownList runat="server" ID="ddlTheYear" 
            CssClass="input2" Width="50px" AutoPostBack="True" 
            onselectedindexchanged="ddlTheYear_SelectedIndexChanged"></asp:DropDownList>&nbsp;&nbsp;
        周数：<asp:DropDownList runat="server" ID="ddlWeek" CssClass="input2" Width="40px" 
            AutoPostBack="True" onselectedindexchanged="ddlWeek_SelectedIndexChanged"></asp:DropDownList>&nbsp;&nbsp;<asp:Button runat="server" ID="btnCurWeek" Text="当前周"  CssClass="btn_normal"  onMouseOver="this.className='btn_active'" 
            onMouseOut="this.className='btn_normal'" onclick="btnCurWeek_Click" />
    </div> 
    <div class="query_area">	
    <asp:Button runat="server" ID="btnSave" Text="保 存"  CssClass="btn_normal"  onMouseOver="this.className='btn_active'" 
            onMouseOut="this.className='btn_normal'" onclick="btnSave_Click"/>
        <asp:HiddenField runat="server" ID="hidID" />
        <asp:Button runat="server" ID="btnRebind" style="display:none" onclick="btnRebind_Click" /><br />
    </div> 
    <table cellpadding="0" width="98%" cellspacing="0" border="1" class="tEdit">
		<tr>
			<td class="title1">开始日期</td>
			<td><asp:TextBox ID="dtpStartDate" runat="server" cssClass="input2" onfocus="setday(this);" Width="96%"></asp:TextBox></td>
            
		</tr>
        <tr>
            <td class="title1">结束日期</td>
			<td><asp:TextBox ID="dtpEndDate" runat="server" cssClass="input2" onfocus="setday(this);" Width="96%"></asp:TextBox></td>
        </tr>
        <tr>
            <td class="title1">报送日期</td>
			<td><asp:TextBox ID="dtpSendDate" runat="server" cssClass="input2" onfocus="setday(this);" Width="96%"></asp:TextBox></td>
        </tr>
        <tr>
            <td class="title1"  colspan="2">其他事项</td>
            
        </tr>
        <tr>
            <td colspan="2">
              
               <div class="button_area">
        <asp:Button runat="server" ID="btnAdd" CssClass="btn_normal" 
			onMouseOver="this.className='btn_active'" 
            onMouseOut="this.className='btn_normal'" Text="新 增" onclick="btnAdd_Click"/>
        <asp:Button runat="server" ID="btnDelete" CssClass="btn_normal" 
			onMouseOver="this.className='btn_active'" 
            onMouseOut="this.className='btn_normal'" Text="删 除" 
            OnClientClick="javascript:return getNoSelectionAlert('chkID','请选择要删除的记录后在执行此操作！');"             
            onclick="btnDelete_Click" />
    </div>
            
                <table cellpadding="0" width="100%" cellspacing="0" border="1" class="t1" id="tGrid">
		<thead>  
            <th align="center" width="30px">
                <input type="checkbox" name="chkAll" value="checkbox" onclick='javascript:checkAll(this,"chkID")' />
            </th>
            <th align="center" width="40px">事项序号</th>
            <th align="center">事项描述</th>
            <th width="50px">操作</th>
      	</thead>           
		<asp:Repeater runat="server" ID="rptList">
			<ItemTemplate>
				<tr>
					<td align="center" >
						<input type="checkbox" name="chkID" id="chk<%# DataBinder.Eval(Container.DataItem,"ID") %>"  value="<%# DataBinder.Eval(Container.DataItem,"ID") %>" >
					</td>
					<td><%#  DataBinder.Eval(Container.DataItem,"SortNo") %></td>
					<td style="text-align:left"><%#  (DataBinder.Eval(Container.DataItem,"Description")+"").Replace("\n","<br/>") %></td>
					<td>
						<%# GetButtonScript(DataBinder.Eval(Container.DataItem,"ID")+"") %>
					</td>
				</tr>  
			</ItemTemplate>
		</asp:Repeater>
    </table>

            </td>
        </tr>
    </table>



            </td>
            <td>

                 <iframe id="ifrmInfo" scrolling="yes" frameborder="0"  src="" style="width:100%;height:480px;"></iframe> 

            </td>
        </tr>
    </table>
    
    
</asp:Content>
